﻿using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using ProductManagement.Domain;

namespace ProductManagement.EntityFrameworkCore
{
    public class ProSpecMapping : IEntityTypeConfiguration<ProSpec>
    {
        public void Configure(EntityTypeBuilder<ProSpec> b)
        {
            b.Property(q => q.Id).IsRequired().HasComment("主键Id").HasColumnType("bigint").ValueGeneratedNever();
            b.Property(q => q.Name).IsRequired().HasMaxLength(20).HasComment("规格名称");       
        }
    }
}